package grammer;
class A
{
    static
    {
        System.out.println("A在静态代码块");
    }
}   
class B extends A
{
    static
    {
        System.out.println("B在静态代码块");
    }
 
    public static int factor = 25;
 
    public B()
    {
        System.out.println("我是B~");
    }
}
class C extends B
{
    static
    {
        System.out.println("C在静态代码块");
    }
 
    public C()
    {
        System.out.println("我是C~");
    }
}
public class InitializationDemo
{
    public static void main(String[] args)
    {
        System.out.println("B的岁数:" + C.factor);  //入口
    }
}